<?php

declare(strict_types=1);

namespace app\group\model\order;

use sheep\model\Common;
use sheep\model\auth\Admin;

class GroupTicket extends Common
{
    protected $name = 'group_ticket';

    protected $type = [
        'validity_time' => 'timestamp',
    ];

    public function getStatusAttr($value, $data)
    {
        $status = [
            0 => '未使用',
            1 => '已使用',
            -1 => '退款',
            -2 => '过期'
        ];
        return ['text' => $status[$this->getData('status')], 'value' => $this->getData('status')];
    }

}
